package pub.guoxin.oops.manager;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import pub.guoxin.oops.common.restful.SwaggerConfiguration;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import static pub.guoxin.oops.constants.OopsPathConstants.*;

/**
 * Created by guoxin on 17-10-17.
 */
@Configuration
@EnableSwagger2
public class ManagerRESTFulConfiguration extends SwaggerConfiguration {

    @Bean
    public Docket groupApi() {
        return baseDocket("Group", GROUP_PATH, "分组模块", "1.0");
    }

    @Bean
    public Docket companyApi() {
        return baseDocket("Company", COMPANY_PATH, "公司模块", "1.0");
    }

    @Bean
    public Docket userApi() {
        return baseDocket("User", USER_PATH, "用户模块", "1.0");
    }

    @Bean
    public Docket smsApi() {
        return baseDocketNoHeader("Sms", SMS_PATH, "Sms模块", "1.0");
    }

    @Bean
    public Docket TimestampApi() {
        return baseDocketNoHeader("Timestamp", TIMESTAMP_PATH, "Timestamp模块", "1.0");
    }

    @Bean
    public Docket deviceApi() {
        return baseDocket("Device", DEVICE_PATH, "Device模块", "1.0");
    }

    @Bean
    public Docket communicationApi() {
        return baseDocket("Communication", COMMUNICATION_PATH, "Communication模块", "1.0");
    }
    @Bean
    public Docket dataAlarmConfigApi() {
        return baseDocket("DataAlarmConfig", DATA_ALARM_CONFIG_PATH, "DataAlarmConfig模块", "1.0");
    }

    @Bean
    public Docket alarmApi() {
        return baseDocket("Alarm", ALARM_PATH, "ALARM模块", "1.0");
    }

    @Bean
    public Docket alarmDisposeApi() {
        return baseDocket("AlarmDispose", ALARM_DISPOSE_PATH, "AlarmDispose模块", "1.0");
    }

    @Bean
    public Docket testApi() {
        return baseDocket("Test", "/test", "Test模块", "1.0");
    }

}
